/* global BMapGL */

    /* global Stats */

    /* global mapv */

    /* global mapvgl */

    /* global initMap */

    /* global purpleStyle */
    var map = initMap({
        tilt: 0,
        heading: 0,
        center: [110.310739,20.000249],
        zoom: 13,
        style: purpleStyle
    });

    var view = new mapvgl.View({
        map: map
    });

    var lineLayer = new mapvgl.LineLayer({
        color: 'rgba(255, 71, 26, 0.9)',
        width: 4,
        animation: true,
        duration: 30, // 循环时间2s
        trailLength: 0.3, // 拖尾长度占间隔的0.4
        interval: 0.2 // 粒子长度占线整体长度的0.2
    });

    fetch('./data/2017-05-01-route.json').then(function (rs) {
        return rs.json();
    }).then(rs => {
        // alert('data')
        data = rs.hour8

        view.addLayer(lineLayer);
        lineLayer.setData(data);
    });